import request from "../utils/request";
import config from '../config'

//登录接口
export function login(data) {
    return request.post("/phone/admin/login", data)
}
//注册接口
export function register(data) {
    return request.post("/phone/admin/register", data)
}
//查询分类列表接口
export function getCategoryList() {
    return request.get('/phone/category/findAll')
}
//查询单个分类接口
export function getCategory(params) {
    return request.get('/phone/category/findOne', { params })
}
//查找商品列表接口
export function getGoodsList() {
    return request.get('/phone/goods/findAll')
}
//查找商品分页列表接口
export function getGoodsOnePage(params) {
    return request.get('/phone/findOnePage', { params })
}
//查找单个商品接口
export function getGoods(params) {
    return request.get('/phone/goods/findOne', { params })
}
//根据category_id查询商品列表接口
export function getGoodsById(params) {
    return request.get('/phone/goods/findById', { params })
}
//修改密码接口
export function changeAdminPassword(data) {
    return request.post('/phone/setting/changePassword', data)
}
//修改头像接口
export function changeAdminAvatar(data) {
    return request.post('/phone/setting/changeAvatar', data)
}